/**
 * 函数即对象
 * typeof 函数  //function
 * typeof 对象  //object
 *
 * instanceof 函数    //object
 * instanceof 对象  //object
 *
 * 对象都是通过函数创建的
 */

function A() {
    this.name = '张三';
    this.age = 12;
}

var a = new A();
console.log(a instanceof Object);
console.log(typeof A);
console.log('-----------------------');

//其实下边這两个对象也是通过函数创建的，只不过是语法糖用了快捷方式
var b = {name: '张三', age: 12};
var c = ['张三', 12];

var objb = new Object();
objb.name = '张三';
objb.age = 12;

console.log(objb instanceof Object);
console.log(typeof Object);
console.log('-----------------------');

var arrc = new Array();
arrc.push('张三');
arrc.push(12);
console.log(arrc instanceof Object);
console.log(typeof Array);
console.log('-----------------------');






